#!/bin/bash
# 离线安装 docker-compose (二进制)
# https://github.com/docker/compose (download address)

tar -xf docker-compose-linux-x86_64.tar.gz

sha256sum --check docker-compose-linux-x86_64.sha256

if [ $? -eq 0 ]; then
	sudo install -o root -g root -m 0755  docker-compose-linux-x86_64 /usr/local/bin/docker-compose
	ln -s /usr/local/bin/docker-compose /usr/local/bin/compose &>/dev/null
	compose --version
	mv docker-compose-linux-x86_64 /tmp
fi
